package com.healthy.entity;
import java.util.HashSet;
import java.util.Set;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * 
 * @author HGB丶阳光
 * @date 2020年6月10日
 * @description: 管理员实体类创建
 *
 */
@JsonIgnoreProperties(value = {"handler"})
public class YgAdmins implements java.io.Serializable {
	
	/**
	 * 解决复杂实体类之间产生的序列化问题
	 */
	private static final long serialVersionUID = 4612482177131140445L;
	
	private String aid;        // 管理员主键 aid 
	private String username;   // 管理员账号，必须字段
	private String password;   // 管理员密码，必须字段
	private String nickname;   // 管理员昵称，必须字段
	private Integer powerValue; // 管理员权值，4:审核，2:发布文章，1:审核商品

	private Set<YgDocument> documentlist = new HashSet<>();  // 管理员与文章一对多关联
	
	public YgAdmins() {

	}

	public YgAdmins(String aid, String username, String password, String nickname, Integer powerValue,
			Set<YgDocument> documentlist) {
		super();
		this.aid = aid;
		this.username = username;
		this.password = password;
		this.nickname = nickname;
		this.powerValue = powerValue;
		this.documentlist = documentlist;
	}
	
	public YgAdmins(String username, String nickname, Integer powerValue) {
		super();
		this.username = username;
		this.nickname = nickname;
		this.powerValue = powerValue;
	}

	public String getAid() {
		return aid;
	}

	public void setAid(String aid) {
		this.aid = aid;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public Integer getPowerValue() {
		return powerValue;
	}

	public void setPowerValue(Integer powerValue) {
		this.powerValue = powerValue;
	}

	public Set<YgDocument> getDocumentlist() {
		return documentlist;
	}

	public void setDocumentlist(Set<YgDocument> documentlist) {
		this.documentlist = documentlist;
	}

	@Override
	public String toString() {
		return "YgAdmins [aid=" + aid + ", username=" + username + ", password=" + password + ", nickname=" + nickname
				+ ", powerValue=" + powerValue + ", documentlist=" + documentlist + "]";
	}
	
}
